import { request } from "@/utils/service"
import type * as QType from "./types/quser"

/** 登录企业预警通扫码uuid */
export function getUUID() {
  return request<any>({
    url: "qyyjt/uuid",
    method: "get"
  })
}

/**登录状态轮询 */
export function getLoginStatus(data: { uuid: string }) {
  return request<{ data: { data: QType.qLoginResponseData } }>({
    url: "qyyjt/login-status",
    method: "get",
    params: data
  })
}

/**先仅考虑初始添加 */
export function addOrUpdateQuser(data: QType.BindAccountRequestData) {
  return request<QType.BindAccountResponeseData>({
    url: "qyyjt/quser",
    method: "post",
    data
  })
}

/**获取已有绑定用户信息 */
export function getBindedQuser() {
  return request<QType.getQuserResponseData>({
    url: "qyyjt/quser",
    method: "get"
  })
}
